<template>
	<view class="content">
		<view class="card">
			<view class="head">
				<image :src="data.logo" mode=""></image>
				<view class="name">
					{{data.user}}
				</view>
			</view>
			
			<view class="title">
				简介
			</view>
			<view class="intro">
				<text class="">
				{{data.brand_content}}
			</text>
			</view>
			
			
			<view class="title">
				教师资格证
			</view>
			<view class="img">
				<image :src="item" mode="aspectFill" v-for="(item ,index) in data.pic_set_a" :key="index" @click="enlargement([item],index)"></image>
			</view>
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				teacher_id:'',
				data:{}
			}
		},
		onLoad(e) {
			this.teacher_id=e.id
			this.newData()
		},
		methods: {
			newData(){
				this.$myRuquest('home/index/teacher_details',{teacher_id:this.teacher_id}).then(res=>{
					if(res.code==400){
						this.data=res.data
					}
				})
			},
			enlargement(data, index) {
				uni.previewImage({
					urls: data,
					current: index,
					longPressActions: {
						itemList: ['发送给朋友', '保存图片'],
						success: function(data) {
							
						},
					}
				});
			}
		}
	}
</script>

<style lang="less" scoped>
	.content{
		padding-top: 160upx;
		background-color: rgb(255, 196, 1);
	}
	.card{
		background-color: #fff;
		border-top-left-radius: 30upx;
		border-top-right-radius: 30upx;

		.head{
			position: relative;
					height: 120upx;
			image{
				width: 120upx;
				height: 120upx;
				border-radius: 12upx;
				position: absolute;
				left: 40upx;
				top: -30upx;
			}
			.name{
				position: absolute;
				left: 180upx;
				top: 20upx;
				font-weight: 900;
			}
		}
		.title{
			font-weight: 900;
			margin-left: 20upx;
		}
		.intro{
			width: calc(100% - 40upx);
			margin: 20upx;
			font-size: 26upx;
			 text-indent:2em;
		}
		.img{
			margin: 0 15upx;
			display: flex;
							flex-wrap: wrap;
			image{
				width: 200upx;
				height: 200upx;
				border-radius: 12upx;
				margin: 20upx;

			}
		}
	}

</style>
